export EDITOR="nvim"
export VISUAL="$EDITOR"
export LESS='-iR --use-color -Dd+b$Du+c'
export MANROFFOPT="-c"

# path
typeset -U path
path+=("$HOME/.local/bin")

# locale
export LANG="en_NZ.UTF-8"
export LC_COLLATE="C"

# plugins
packages=(
    zsh-users/zsh-autosuggestions
    zsh-users/zsh-syntax-highlighting
    zsh-users/zsh-history-substring-search
)

for package in "${packages[@]}"; do
    if [ ! -d "$HOME/.local/share/zsh/${package##*/}" ]; then
        git clone -q "https://github.com/$package" \
            "$HOME/.local/share/zsh/${package##*/}" &
    fi
done

# startup
if [ "$(tty)" = "/dev/tty1" ] && [ -n "$(command -v Hyprland)" ]; then
    exec Hyprland
fi
